<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/6
 * Time: 20:55
 */


require_once "dataSQL.php";
require_once "rootDB.php";
$rootDB=new rootDB();
$user=$_POST['user'];
$password=$_POST['pass'];
$password=md5($password);
$datea=$rootDB->AdminLoginU($user,$password);
        $result = $datea;
        if ($result) {
            $dat = array(
                'message' =>"登陆成功",
            );
            session_start();
            $_SESSION['admin']=$user;
            echo json_encode($dat);
        } else {
            $dat = array(

                'message' =>"登陆失败，密码错误",

            );
            echo json_encode($dat);

        }



